package com.example.nep.dao;

import com.example.nep.model.AqiFeedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.nep.vo.AqiDetailVO;
import com.example.nep.vo.FeedBackDetailVO;
import com.example.nep.vo.FeedBackListVO;
import com.example.nep.vo.FeedbackShowVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author han
 * @since 2024-04-10
 */
public interface AqiFeedbackMapper extends BaseMapper<AqiFeedback> {
    /**
     * 公共监督员分页查询
     * @param pageSize
     * @param lastAfId
     * @param telId
     * @return
     */
    List<FeedBackListVO> findBackAll(@Param("pageSize") Integer pageSize,
                                     @Param("lastAfId") Integer lastAfId,
                                     @Param("telId") String telId);

    /**
     *网格员分页查询
     * @param pageSize
     * @param lastAfId
     * @param gmCode
     * @return
     */
    List<FeedBackListVO> gmPage(@Param("pageSize") Integer pageSize,
                                @Param("lastAfId")Integer lastAfId,
                                @Param("gmCode") String gmCode);

    List<FeedbackShowVO> adminPage(@Param("provinceId") Integer provinceId,
                                   @Param("cityId") Integer cityId,
                                   @Param("estimatedGrade") Integer estimatedGrade,
                                   @Param("afDate") String afDate,
                                   @Param("state") Integer state,
                                   @Param("limitParam1") Integer limitParam1,
                                   @Param("limitParam2") Integer limitParam2
                                   );
    List<AqiDetailVO> aqiPage(@Param("provinceId") Integer provinceId,
                                   @Param("cityId") Integer cityId,
                                   @Param("confirmDate") String confirmDate,
                                   @Param("limitParam1") Integer limitParam1,
                                   @Param("limitParam2") Integer limitParam2
    );
    int aqiCount(@Param("provinceId") Integer provinceId,
              @Param("cityId") Integer cityId,
              @Param("confirmDate") String confirmDate);

    int count(@Param("provinceId") Integer provinceId,
              @Param("cityId") Integer cityId,
              @Param("estimatedGrade") Integer estimatedGrade,
              @Param("afDate") String afDate,
              @Param("state") Integer state);

    /**
     * 网格员查看详细信息
     * @param afId
     * @return
     */
    FeedBackDetailVO feedBackDetail(@Param("afId") Integer afId);

    AqiDetailVO aqiDetail(@Param("afId") Integer afId);
}
